Data recording method and data recording apparatus

ABSTRACT

The latest management data recorded in a recording medium is read. Then, it is judged whether the fault is in this latest management data or not. When it is judged the fault is not in this latest management data, a data size of user data under the management of this latest management data is compared with a data size of the user data recorded actually in the recording medium. In the judgment explained above, when the latest management data cannot be read, when it is judged the fault is in the latest management data or when it is judged a data size of user data under the management of the latest management data is not identical to a data size of the user data recorded actually in the recording medium, management data can be updated by analyzing the user data recorded in the recording medium. Thereby, there is provided a repair technique for the recorded data in response to an accidental shut-off condition of power supply in a data recording apparatus for recording user data and management data used for management of such user data to the recording medium.

BACKGROUND OF THE INVENTION

The present invention relates to a data recording technique forrecording, to a recording medium, data such as video and audio data (AVdata) (hereinafter, referred to as a user data) and a management data ofsuch user data and reproducing such user data by utilizing themanagement data and particularly to a data recording technique forrepairing an irregular event such as mismatch between recorded user dataand management data or fault in user data or management data when suchirregular event is generated due to an accidental failure of powersupply.

With continuous improvement in the capacity of a recording medium suchas an optical disc and a magneto-optical disc, investigation anddevelopment are dynamically progressed to a method and an apparatus forrecording and rerecord of a user data through compression in amount ofdata of a digital signal. Particularly, in an apparatus for recording auser data on the real-time basis, if an accidental failure of powersupply occurs, a mismatch is generated in a certain case between therecorded user data and management data or recording operation issuspended under the condition that a fault is generated in the user dataor management data.

The technique for repairing the data on a recording medium under thecondition explained above to realize again the monitor and additionalrecord of data is described, for example, in the Japanese UnexaminedPatent Publication 2001-266496 (hereinafter, referred to as officialgazette 1).

SUMMARY OF THE INVENTION

The official gazette 1 discloses a technology that a non-volatile memoryis mainly provided within a data recording apparatus to store therein aflag which indicates the recording condition and when supply powersource is started again, the predetermined repairing operation isexecuted with reference to such flag. Moreover, the official gazette 1also discloses a technique that recording and rerecord and repair areexecuted in the corresponding format to a recording medium which isbasically allows rerecording operation such as deletion of user data andupdate by over recording of the management data.

However, when an accidental fault of power supply is generated duringthe recording operation in a data recording apparatus to execute therecording operation in the predetermined recording format, for example,to a recording medium which does not allow rerecording operation, anyconsideration has not yet been taken for repair process of recordingdata by paying attention to the recording medium which does not allowany rerecording operation. Moreover, for the data recording apparatuswhich can use both a recording medium which allows rerecording operationand a recording medium which does not allow rerecording operation, anyparticular consideration has not yet been taken for repair process ofrecorded data depending on a class of recording medium or recordingformat. Moreover, the data recording apparatus disclosed in the officialgazette 1 has a problem that a structural element such as a non-volatilememory is required and thereby format control is complicated.

For example, when it is assumed that a user data is recorded to a DVD-Rwhich is a recording medium allowing only once the recording operationon the real-time basis in the DVD video format used for an ordinaryvideo disc which may be available in the market, the user data andmanagement data must be finalized after the recording operation(hereinafter, called the finalization) depending on the DVD video formatin order to watch the recorded data with a DVD player. If an accidentalfault is generated in the power supply during the recording operation insuch data recording apparatus which executes the recording operationexplained above, when adequate repairing operation is not executed afterthe start of the successive supply of power source, not only reading andadditional record of existing data but also finalization can no longerbecome impossible. As a result, it has been assumed that use of the discwill be impossible.

The present invention has been proposed considering the backgroundexplained above. Therefore, it is an object of the present invention tomake it possible to execute again continuous operations such as monitor,additional record or finalization process of the recording data when anaccidental fault is generated in the supply of power source duringrecording of data into a recording medium. Moreover, it is also anobject of the present invention to lower a cost of apparatus and alsosimplify the control of a format.

In view of achieving the object explained above, a data recordingtechnique of the present invention for recording a user data and amanagement data for management of such user data to a recording mediumreads the latest management data stored in the recording medium, judgeswhether the latest management data contains a fault or not and compares,when it is judged that the latest management data does not includes afault, compares a data size of the user data under the management ofthis latest management data with a data size of the user data recordedactually in the recording medium. When the latest management data cannotbe read by the judgment explained above, or the latest management datais judged to include a fault or a data size of the user data under themanagement of the latest management data is judged to be mismatched fromthe data size of the user data recorded actually in the recordingmedium, the data recording technique updates the management data byanalyzing the user data recorded in the recording medium.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a first embodiment of the recordingand reproducing apparatus of the present invention.

FIG. 2 is a diagram showing a directory structure of recording data.(after finalization)

FIG. 3 is a diagram showing an example of a disc image.

FIG. 4 is a diagram showing a schematic flow of the repairing operationin the first embodiment of the recording and reproducing apparatus ofthe present invention.

FIG. 5 is a diagram showing an example of recording data condition whichrequires repair.

FIG. 6 is a diagram showing another example of recording condition whichrequires repair.

FIG. 7 is a block diagram of only a processing potion for repair processin the first embodiment of the data recording apparatus of the presentinvention.

FIG. 8 is a diagram showing a management structure of a stream data anda data structure.

FIG. 9 is a diagram showing an example of the recording condition of thestream data in a second embodiment of the recording and reproducingapparatus of the present invention.

FIG. 10 is a diagram showing a schematic flow of the repairing operationin a third embodiment of the recording and reproducing apparatus of thepresent invention.

FIG. 11 is a diagram showing a schematic flow of the repairing operationin a fourth embodiment of the recording and reproducing apparatus of thepresent invention.

FIG. 12 is a diagram showing a schematic flow of the repairing operationin a fifth embodiment of the recording and reproducing apparatus of thepresent invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiments of the present invention will be explainedwith reference to the accompanying drawings. FIG. 1 is a block diagramshowing a first embodiment of the data recording apparatus of thepresent invention which enables, for example, the real-time recording ofAV data using an optical disc which allows recording the data only onceto an optical disc (non-rerecording disc). Hereinafter in this Detaileddescription, an optical disc is explained as a recording medium. In thisembodiment, an AV data corresponds to a user data. The AV data isinputted via an input terminal 1. An encoding/decoding section 2(hereinafter, referred to as a encode/decode circuit) encodes the AVdata or decodes the encoded AV data. A data indicating an instruction ofan operator is inputted via a user I/F 3, while a data for requesting aninstruction to a user is outputted via the user I/F 3. A controller 4controls operations of the apparatus as a whole. Operations of thecontroller 4 in this embodiment will be explained later. A memory forprogram 5 is used to memorize contents of control of the controller 4. Amemory for developing of management data 6 is a non-volatile memory fortemporarily storing an intermediate management data explained later. Atrack buffer 7 is a memory for absorbing a difference between a transferrate of a drive 8 and an encoding rate of a stream data to be explainedlater. The drive 8 records a data to an optical disc 9 and reads a datatherefrom. An AV data is outputted via an output terminal 10.

Prior to explanation of the recording and reproducing operation, aintegral management data which is recorded to the optical disc 9 afterthe finalization and a recording format of the AV data will be explainedwith reference to FIG. 2 and FIG. 3. (finalization will be explainedlatter)

FIG. 2 shows a directory structure after the finalization of the data tobe recorded to the optical disc 9. In this embodiment, the directorystructure conforms to the DVD video format, for example, as the formatof the recording data. In this format, the video data is encoded by theMPEG Video format which is the international standards of the videoencoding format, while the audio data is encoded by the adequate formatsuch as MPEG Audio format or linear PCM format and both video data andaudio data are multiplexed with the format conforming to the MPEG Systemformat. In addition, in this format, it is requested that the managementdata which is perfectly matched with the AV data is recorded for theconvenience of the reproducing operation.

In FIG. 2, a sub-directory 201 for DVD video is arranged under a rootdirectory 200 and the management data file and AV data file generatedare all disposed under the sub-directory 201. An integrated managementdata file 202 is used to record an integral management data forreproducing the AV data recorded and this integral management data alsoincludes, for example, a reproducing sequence data. An integral menudata file 203 is an AV data file for integral menu display forreproduction and is recorded as the encoding data of the format same asthat of an AV data file 207 explained later. In an integral managementdata backup file 204, the same content as the integral management datafile 202 is recorded and this backup file 204 is used as the backup filewhen the data cannot be read from the integral management data file 202.An AV data management data file 205 is used to record in detail the AVdata which is placed under the management in every unit among aplurality of units, while a menu data file 206 is used to record the AVdata for menu display in every unit among a plurality of units as theencoding data of the same format as the AV data file 207 explainedlater. The AV data file 207 is used to record a stream data which ismultiplexed by the MPEG format. In more practical, not only the videodata and audio data but also the data for reproduction control andsearch data used for special reproduction are multiplexed as the AVdata. An AV data management data backup filed 208 is used to record thesame content as the AV data management data file 205 and is also used asthe backup file when the data cannot be read from the AV data managementdata file 205.

These files are sequentially disposed toward the external circumferencefrom the internal circumference in the form that not only it is enoughto logically have the directory structure as the DVD video format butalso the file sequence up to the upper file from the lower file in FIG.2 is physically held on the optical disc 9. In the data recordingapparatus for realizing the real-time recording, only the possible datawhich is required is generated on the real-time basis because it isdifficult to generate all files on the real-time basis. The finalgeneration of the other files including the filing of data which aregenerated on the real-time basis are executed at the time of finalizingoperation. That is, the finalization has to be executed to equalizingthe data format in order to reproduce the recorded data with a DVDreproducing apparatus which may be available at the market.

FIG. 3 is a schematic diagram showing an image of disc of the opticaldisc before execution of the finalization as continuation of volumes.The left direction indicates the internal circumference of disc, whilethe right direction indicates the external circumference of disc. Inorder to record the data on the real-time basis, the volume space isstructured previously to reserve three areas, namely the areas 301, 302and 303.

As explained above, the filing of data is conducted at the time offinalization and only the necessary data is sequentially recorded on theoptical disc 9 in the course of the recording before the finalization.

The stream data, which is finally filed as the AV data file 207explained above, is recorded in the real-time to an optical disc.Moreover, a temporary management data to finally generate the integralmanagement data file 202 and AV data management data 205 (hereinafterreferred to as an intermediate management data) is updated on thereal-time basis in the memory for development of management data (referto FIG. 1) and the intermediate management data which has been updatedin every end (or shut-off of the power supply) from the start of thesingle recording of the stream data is recorded to the optical disc. InFIG. 3, the data 304 to data 306 indicate the intermediate managementdata and particularly the data 306 is the latest (effective)intermediate management data, while the data 304 to data 305 are the(invalid) intermediate management data generated before data 306. Onedata unit corresponds to the end (or shut-off of the power supply) fromthe start of single recording operation. And the preceding intermediatemanagement data is invalidated in every data unit because the opticaldisc 9 does not allow the rerecording operation and the latestintermediate management data is recorded to the optical disc 9 after therecording of stream data. Namely, the data which is in the outset in thearea 302 can be recognized as the effective intermediate management databy sequentially arranging the intermediate management data from thestarting position of the area 302. It is requested for convenience ofprocess that the data unit of a single recording operation is set to 32kByte size corresponding to the 1ECC block for error correction.Moreover, the data 307 is the stream data to generate the AV data file207 at the time of finalization and the additional record issequentially conducted to the optical disc 9, unlike the intermediatemanagement data explained above.

At the time of finalization, a file format data is recorded to the area301 for physically management of each file format and each file isgenerated and recorded to the area 302 and the successive areas based onthe intermediate management data conforming to the file arrangement.

That is, the integral management data file 202, integral menu data file203, integral management data backup file 204, AV data management datafile 205 and menu data file 206 are respectively generated and aresequentially recorded to the areas after the area 302 where theintermediate management data is recorded. Moreover, the stream data inthe area 303 is filed as the AV data file 207 explained above and the AVdata management data backup file 208 is recorded to the successiveareas. Physically, an invalid data is embedded for the alignment betweenrespective files confirming to the partitioning of the ECC blocks.Moreover, in view of closing a disc, the Lead_in area is arranged andrecorded at the internal circumference of the area 301, while theLead_out area at the outer most external circumference of the area 303.

Here, the intermediate management data may be recorded to any area onthe disc before the finalization. However, recording of the intermediatemanagement data to the area 302 as shown in FIG. 3 is preferable fromthe following two reasons.

-   (1) When the intermediate management data is recorded to the area    302 in place of the other areas, the time required to seek the    intermediate management data in order to generate the integral    management data file or the like at the time of finalization can be    so far reduced.-   (2) When the intermediate management data is recorded to the area    302 in place of the other areas, amount of dummy data to be embedded    to the area where the stream data is not recorded (hereinafter    referred to as a vacant area) at the time of finalization can be    reduced in the case where the finalization is conducted in such a    stage that the amount of stream data is rather small and thereby the    time required for the finalization can-also be reduced.

Namely, with a couple of reasons explained above, the time required forfinalization can be reduced by recording the intermediate managementdata to the area 302 in place of the other areas. Therefore, in thisembodiment, the intermediate management data is recorded to the area302.

Under the conditions explained above, data recording operation will beexplained first with reference to FIG. 1. The video data and audio data(AV data) inputted at the input terminal 1 are encoded with thepredetermined encoding format explained above in the Encode/decodecircuit 2. Thereby, amount of data is compressed and sequentiallymultiplexed. The stream data as the multiplexed AV data is once storedin the track buffer 7 to absorb a difference between the encoding rateand transfer rate of the drive 8 and to add a search data which isnecessary at the time of reproduction. And this stream data issequentially recorded additionally to the area 303 of the optical disc 9with the drive 8 in every predetermined data unit. The controller 4controls, based on an instruction input of a user via the user I/F 3,respective sections explained above, a program memory 5 explained laterand the memory for developing of management data 6. As the controlcontents, the required contents are adequately loaded by recording andreading the data to and from the memory for program 5. The Encode/decidecircuit 2 is integrated but this Encode/decode circuit 2 can also berealized in the composite structure in which a part of the encodingprocess is executed with the hardware, while the other operations up tothe multiplexing are executed with the controller 4.

Moreover, the latest intermediate management data generated at the timeof recording operation is once developed by the memory for developing ofmanagement data 6 and it is then updated simultaneously with recordingof the stream data and this latest intermediate management data isrecorded to the area 302 of the optical disc 9 when the recording of thestream data is ended (or when the power supply is shut off). In the casewhere the stream data is recorded first in the optical disc 9, anintermediate management data is newly generated and is developed intothe memory 6 for development of the management data but when the streamdata is additionally recorded to the optical disc 9 to which such streamdata is already recorded in the past, the new intermediate managementdata is developed to the memory for developing of management data 6after the latest intermediate management data is read from the opticaldisc 9.

Next, the reproducing operation will be explained. In FIG. 1, a streamdata is read from the desired data position with the driver 8 from thearea 303 of the optical disc 9 in the reverse flow of that during therecording operation explained above and is once accumulated in the trackbuffer 7. A difference between the transfer rate of the drive 8 and theencoding rate of stream data is absorbed and the video data and audiodata of the AV data in the Encode/decode circuit 2 are isolated anddecoded and are then outputted from the output terminal 10 in theadequate signal format.

Like the operations in the recording mode, the controller 4 controlseach section explained above by loading the contents of memory forprogram 5 but the latest intermediate management data is read, as thereproducing operation, with the drive 8 from the area 302 of the opticaldisc 9 prior to the read operation of the stream data and the contentsthereof are developed in the memory 6 for developing the managementdata. Instruction input by an operator inputted through the user I/F 3is interpreted by the controller 4 and the reproducing operation isexecuted responding to the intermediate management data developed in thememory for developing of management data 6.

Here, consideration is taken for the case where an accidental shut-offof power supply is generated during the recording operation. In morepractical, for example, when a data recording apparatus like a videocamera is assumed, such shut-off condition corresponds to the case wherea battery is accidentally disconnected to generate shut-off condition ofpower supply. If such condition is generated while the data recording isconducted to the optical disc 9 by the drive 8, it is probable that therecording of the intermediate management data 306 in FIG. 3 or streamdata is completed under the imperfect condition. As a result, generatedhere is the situation that the intermediate management data 306 does notcorrectly reflect the contents of recording of the stream data 307.

Therefore, the repair process for the recording data in such a case willthen be explained with reference to FIG. 4 and FIG. 7. FIG. 4 shows aschematic operation flow of the repair process. FIG. 7 is a functionblock diagram of the controller 4 in the repair process of the datarecording apparatus shown in FIG. 1. In FIG. 7, the like elements asthat of FIG. 1 are designated with the like reference numerals.

In the step S401, the repair process starts and the successiveoperations are carried out not only when the power switch is turned ONagain after the accidental shut-off condition of power supply but alsoafter the ordinary power supply ON operation is executed.

In the step S402, the drive 8 reads, under the control of the driveprocessing potion 701, the latest intermediate management data from theoptical disc 9 and a management data developing process potion 702develops, under the control of the drive processing potion 701, thelatest intermediate management data read by the drive 8 to the memoryfor developing of management data 6. In this timing, a judgmentprocessing potion 703 judges whether the latest intermediate managementdata can be adequately read by the drive 8 or not under the control ofthe drive processing potion 701. When it is judged that the latestintermediate management data cannot be read adequately, the processshifts to the step S406. Moreover, when the intermediate management datais read adequately, the judgment process potion 703 further judgeswhether a fault is generated or not in the intermediate management datadeveloped in the memory for developing of management data 6. When thejudgment potion 703 judges that any fault is not generated in the latestintermediate management data, the process shifts to the step S403. Whenthe judgment potion 703 judges that a fault is generated in the latestintermediate management data, the process shifts to the step S406.

In the step S406, the judgment process potion 703 judges whether apreceding intermediate management data is recorded in the optical disc 9or not. When the preceding intermediate management data is recorded, theprocess shifts to the step S408 and when the preceding intermediatemanagement data is not recorded, the process shifts to the step S407.

Since the preceding intermediate management data is not recorded to theoptical disc 9 in the step S407, the drive 8 reads all stream datarecorded in the optical disc under the control of the drive processpotion 701 and a stream data analysis process potion 704 analyzes thestream data read from the disc 9 under the control of the drive processpotion 701. A management data generation process potion 705 generates anintermediate management data based on the result of analysis by thestream data analysis process potion 704 and develops a new intermediatemanagement data to the memory for developing of management data 6.

In the step S408, the drive 8 read, since a fault is generated in thelatest intermediate management data corresponding to the data 306 ofFIG. 3, the data 305 as the preceding intermediate management data underthe control of the drive process potion 701 and the management datadeveloping process potion 702 develops the data 305 as the precedingintermediate management data read by the drive 8 into to memory fordeveloping of management data 6 under the control of the drive processpotion 701.

Subsequently, in the step S409, the judgment process potion 703 extractsa data size (=C) of the stream data under the management of thepreceding intermediate management data developed in the memory fordeveloping of management data 6.

In the step S410, the drive 8 reads the stream data after the data sizeC from the optical disc 9 under the control of the drive process potion701, while the stream data analysis process potion 704 analyzes thestream data after the data size C read by the drive 8 under the controlof the drive process potion 701.

The management data generation process potion 705 generates anintermediate management data based on the result analyzed by the streamdata analysis process potion 704 and updates the intermediate managementdata developed in the memory for developing of management data 6.

A relationship between the intermediate management data and the streamdata is shown in FIG. 5. Since the preceding management data isdeveloped into the memory for developing of management data 6, the datasize C of the stream data developed here becomes smaller than the datasize D of the actual stream data.

Therefore, in the step S410, the stream data analysis process potion 704analyzes the data up to the data size D at the end portion of the streamdata from the data size C of the stream data, while the management datageneration process potion 705 generates the intermediate management databased on the result of analysis by the stream data analysis processpotion 704 to compensate for mismatch between the intermediatemanagement data and stream data. Moreover, if a fault is generated inthe stream data, the management data generation process potion 705reflects this fact to the intermediate management data so that suchdefective part is not displayed during the reproducing operation.

When the update process in the step S410 is completed, the drive 8records, in the step S411, the intermediate management data updated inthe memory for developing of management data 6 into the area 302 of theoptical disc 9 as the latest intermediate management data under thecontrol of the drive process potion 701. When the recording operationexplained above is completed, the recording and reproducing apparatus isset to the waiting condition in the step S414 and the repair process iscompleted in the step S415. The process in the step S411 that theupdated intermediate management data is immediately recorded to the disc9 has been explained but it is also possible that the recording to theoptical disc 9 of the intermediate management data is conducted when thepower supply is shut off after completion of the recording andreproducing operation after the condition to wait for the recording andreproducing operation in the step S414. That is, in the step S414, thestream data is further recorded to the optical disc 9 in the real-timemode, the intermediate management data is updated in the memory fordeveloping of management data 6 and the intermediate management datafurther updated as explained above is then recorded to the optical disc9 after the recording of the stream data.

Meanwhile, in the step S403, since latest intermediate management datahas been developed in the memory for developing of management data 6adequately in the step S402, the judgment process potion 703 extracts adata size (=A) of the stream data under the management of the latestintermediate management data developed in the memory for developing ofmanagement data 6.

Subsequently, in the step S404, the judgment process potion 703 extractsa data size (=B) of the actual stream data from the optical disc 9 viathe drive 8 under the control of the drive process potion 701 andcompares A and B in the step S405. When A=B, the condition to wait forthe recording and reproducing operation is set in the step S414 underthe assumption that the preceding shut-off condition of power supply isnormally completed and the repair process is completed in the step S415.Moreover, when A ≠B is judged in the step S405, the process is shiftedto the step S412 under the assumption that the preceding shut-offcondition of power supply has been generated during the recording ofstream data or has accidentally been generated immediately before therecording of intermediate management after the recording of the streamdata.

In the step S412, the drive 8 reads the stream data after that havingthe size A from the optical disc 9 under the control of the driveprocess potion 701 and the stream data analysis process potion 704analyzes the stream data read by the drive 8 under the control of thedrive process potion 701. The management data generation potion 705generates the intermediate management data based on the result analyzedby the stream data analysis process potion 704 and updates theintermediate management data developed in the memory for developing ofmanagement data 6.

A relationship between the intermediate management data and stream datain this case is shown in FIG. 6. The data size A of the stream datawhich is managed by the intermediate management data becomes smallerthan the data size B of the actual stream data. Therefore, in the stepS412, the stream data analysis process potion 704 analyzes the streamdata having the data size B up to the end part of the stream data fromthe stream data after that having the data size A. Thereby themanagement data generation process potion 705 updates the data byreflecting the contents on the intermediate management data in view ofcompensating for mismatch between the intermediate management data andthe stream data. Moreover, if a preceding shut-off condition of powersupply is generated during the recording operation of the stream data,it is probable at the end part 601 of the stream data that the recordingis completed under the condition that the data format is imperfect.Therefore such condition is reflected on the intermediate managementdata so that such defective part is not displayed at the time ofreproducing operation.

Upon completion of the update process in the step S412, the drive 8records the intermediate management data updated in the memory fordeveloping of management data 6 to the area 302 of the optical disc 9 asthe latest intermediate management data under the control of the driveprocess potion 701 in the step S413. When the recording is completed,the repair process is completed in the step S415 through the conditionto wait for the recording and reproducing operation in the step S414. Inthe step S413, the process to immediately record the updatedintermediate management data to the optical disc 9 has been explained,but it is also possible to realize, like the step S411, the recording tothe optical disc 9 when the supply of power source is shut-off aftercompletion of the recording and reproducing operation through thecondition to wait for the recording and reproducing operation in thestep S414.

As explained above, according to the first embodiment, even if anaccidental shut-off is just generated in the supply of power source, itis possible to execute the update process of the intermediate managementdata by obtaining a size of stream data from the intermediate managementdata and then comparing this stream data size with the size of streamdata which is actually recorded. Owing to this structure, it is nolonger required to provide a non-volatile memory within the datarecording apparatus, record a flag indicating the recording condition tothe non-volatile memory and execute the repair process with reference tothis flag when supply of power source is started again. Moreover, sincethe intermediate management data is updated with analysis of streamdata, repair process can be executed without recording of unwanted datato a read-only disc. Since the data having completed the repair processsatisfies the predetermined format, successive operations such asadditional record and completion process can be continued depending onthe instruction input of an operator.

In this embodiment, the structure to execute the update process of theintermediate management data without any conditions depending on theresult of comparison between the size of the stream data indicated inthe intermediate management data and the actual size of the stream datahas been explained above. However, it is also possible to provide a stepto receive an instruction input of an operator before the update processof the intermediate management data and thereby the process is branchedwhen the update process of the intermediate management data is executedimmediately in this timing and not executed depending on suchinstruction input. However, when the update process of the intermediatemanagement data is not executed immediately in this timing depending onthe instruction input, it is required to provide a format to notify thata fault is generated in the data on the disc to an operator such as adisplay of an message output.

Next, as a second embodiment of the present invention, a practicalrepairing method will be explained by indicating an example of thecontents in the case where the data format is imperfect at the end partof the stream data during the repair process explained above.

First, a recording format of the stream data will be explained withreference to FIG. 8.

FIG. 8 shows an example of schematic format and management unit of thestream data recorded to the optical disc 9 conforming to the DVD videoformat. The stream data 801 is formed as a continuation of managementunit called the VOB802 (Video Object). The VOB802 is formed as acontinuation of management unit called the CELL 803 and this CELL 803 isformed as a continuation of management unit called the VOBU804(VOBUnit). The VOB804 is the predetermined encoding unit depending onthe MPEG Video format explained above and since it includes at least anI-picture, this management unit is used as a unit for specialreproduction such as fast-feed or fast-return. Moreover, in the VOBU804,the navigation-pack 805 (“N” is given) including the data forreproduction control and data search data used for special reproductionis arranged first and subsequently, the adequate number of thevideo-packs 806 (“V” is given) including the video data and theaudio-packs 807 (“A” is given) including the audio data are arranged inthe multiplexed format through synchronization. The elements forming theVOBU804 also include a sub-picture pack in addition to three kinds ofelements, but details of this element are not explained in thisspecification.

In the DVD video format explained above, it is required to describe theaddress data at the position isolated as much as about 240 VOBUs inmaximum to the data search data included in the navigation-pack 805 withreference to the VOBU including the relevant pack. However, it is notrequired to describe the data search data over the several CELLs and itis enough, for example, that only the address data of the VOBU includedin the CELL803 is reflected on the data search data of thenavigation-pack 805. Namely, here is introduced a method, in order torecord the stream data while the navigation-pack is inserted on thereal-time basis, that the data is recorded to the optical disc 9 in unitof CELL by once storing data enough for generation of CELL in the trackbuffer 7 and generating and inserting the navigation-pack while the datasearch data is calculated within the range of such data.

FIG. 9 shows an example of the case where the data format has becomeimperfect at the end part of the stream data due to an accidentalshut-off of the supply of power source during the recording of thestream data. From the point of view of management unit, the data isperfectly recorded up to the CELL 901 from the beginning of stream data,but the recording is interrupted in the course of recording operation ofCELL 902 because of generation of shut-off condition of supply of powersource. That is, FIG. 9 shows the condition that the recording ofVOBU903, VOBU904 has been completed accurately, the recording operationis interrupted in the course of VOBU905 and subsequently the data to berecorded of the management units up to the VOBU906 is not recorded.

When a repair process is executed for the stream data in this condition,it can be known by the analysis of stream data that the imperfect datais recorded in the VOBU905. As the repair process, it is reflected onthe intermediate management data that the recording of data of CELL 902is assumed to be completed at the unit VOBU905. However, since theVOBU905 is imperfect as the encoding unit, it is reflected on theintermediate management data that display is not executed during thereproducing operation. Since the data search data of the units up to theVOBU906 is already inserted and stored into the navigation-packsincluded in the VOBU903 and VOBU904, incorrect operation will probablybe generated during the reproducing operation using the data search dataother than the ordinary reproducing operation but it satisfies theformat of the recording data, the additional record of data can becontinued without any problem. When it is requested to perfectly controlthe possibility for such incorrect operation during the reproducingoperation using the data search data, it can be realized by reflectingon the intermediate management data that the CELL902 itself is notreproduced.

As explained above, according to the second embodiment of the presentinvention, even when the recording of stream data is completed in theimperfect condition, it is possible to satisfy the format as therecording data and execute the operation continuously by reflecting iton the intermediate management data that display of the relevant smallunit is not conducted in the update process of the intermediatemanagement data.

FIG. 10 is a flow diagram for explaining a third embodiment of the datarecording apparatus of the present invention. This flow diagram shows aschematic operation of the repair process. The part like those in FIG. 4will be designated with the like reference numerals and details of theseportions are not explained here.

In this third embodiment, the steps S1001, S1002 and step S1003 arenewly added. These steps are mainly executed in the former half of therepair process. As explained above, after the power of the datarecording apparatus is turned ON, when read or development of the latestintermediate management data from the optical disc 9 is judged to beincorrect in the step S402, whether the supply of power is the AC powersupply or not is judged in the step S1001. When the power supply is theAC power source, the repair-process after the step S406 is executed likethe embodiments explained above. If the power supply is not the AC powersource, namely if the power source is supplied from a battery, forexample, of a camera type data recording apparatus, a guiding process tothe AC power source is executed in the step S1003. This process isnecessary to lower the probability as much as possible for generation ofshut-off condition of power source due to insufficient capacity ofbattery or disconnection of battery during the process which is assumedto be generated when the repair process is executed under the conditionthat the power source is supplied from the battery. After an operatorhas executed a preventive process such as change of power supply potionresponding to the guiding process in the step S1003, the process shiftsto the step S406.

In the same manner, when the data size A of the stream data under themanagement of the intermediate management data and the data size B ofthe stream data recorded in the disc 9 are judged to be different fromeach other in the step S405 explained above, whether the power supply isthe AC power source or not is judged in the step S1002. When the powersupply is the AC power source, the repair process of the step S412 andsuccessive steps are executed. When the power supply is not the AC powersource, a guiding process to the AC power source is also executed in thestep S1003 as explained above. After an operator has conducted thepreventive process such as change of the power supply potion, theprocess shifts to the step S412. The guiding process is enough when atleast the contents thereof can be recognized by an operator asrepresented, for example, by a display of message notifying thatswitching to the AC power supply is requested because the update processof the intermediate management data is necessary.

In this embodiment, a structure for executing the update process of theintermediate management data without any condition when it is judgedthat the AC power source is used has been explained, but it is alsopossible, like the first embodiment, that the step for requesting aninstruction input of an operator before the update process of theintermediate management data is conducted is provided and thereby theprocess is branched here depending on the instruction input to the casewhere the update process of the intermediate management data is executedand the case where such update process is not executed. However, in thecase where the update process of the intermediate management data is notexecuted in this timing depending on the instruction input of anoperator, it is also requested to provide a format to notify that afault is generated in the data on the disc to an operator, for example,by displaying a message output as explained above.

Whether the power supply is the AC power source or not can be judgedwhenever before the update process of the intermediate management datais executed. For example, such judgment can be executed immediatelyafter the power is turned ON or before the repair process is started.

As explained above, according to the third embodiment, the step forjudging Whether the power supply is the AC power source or not isprovided before execution of the update process of the intermediatemanagement data, and when the AC power source is not used, shut-offcondition of power supply due to insufficient capacity of battery ordisconnection of battery during update process of the intermediatemanagement data can be eliminated by conducting the guiding process tothe AC power source.

Next, a fourth embodiment of the data recording apparatus of the presentinvention will be explained with reference to FIG. 11. In theembodiments explained above, an optical disc, which allows recordingonly once (non-rerecordable disc) is used as an optical disc. However,it is also possible for the data recording apparatus to selectively usean optical disc which allows a plurality of times of recording operation(rerecordable disc) corresponding to the drive 8 shown in FIG. 1. FIG.11 shows an example of the schematic operations of the repair process inthe data recording apparatus which can selectively use the rerecordabledisc and non-rerecordable disc. Here, it is assumed for the rerecordableoptical disc that the data recording is executed in the recording format(hereinafter, referred to as format (1)) adaptive to the rerecordabledisc which is described in the reference 1 and it is also assumed forthe non-rerecordable optical disc that the data recording is executed inthe recording format (hereinafter, referred to as format (2)) whichprovides the recording data of the format conforming to the final DVDvideo format as explained in the embodiments explained above.

When the power is turned ON first (step S1101), a class of optical discis judged in the step S1102. When the optical disc is judged as thererecordable optical disc, the repair process (hereinafter referred toas the repair process (1) corresponding to the format (1) described inthe reference 1 is executed in the step S1103. Moreover, when theoptical disc is judged as the non-rerecordable optical disc, the repairprocess corresponding to the format (2) (hereinafter referred to as therepair process (2)) as explained above is executed. When one of theserepair processes is completed, the apparatus enters the conditionwaiting for the recording and reproducing operations in the step S1104and thereafter the apparatus completes the repair process in the stepS1105. In regard to the method for judging the optical disc, any onewhich can attain the data to judge the optical disc, for example, bychecking the optical disc class data previously stored in the opticaldisc or by judging physical difference of the optical disc with the datareading potion of the drive 8 may be used.

As explained above, according to the fourth embodiment of the presentinvention, the repair process can be executed corresponding torespective recording data of the optical disc by judging the opticaldisc after the power is turned ON and sharing the repair process.Thereby, the subsequent operations such as watching of video data andadditional data record can be executed continuously.

Next, a fifth embodiment of the data recording apparatus of the presentinvention will be explained with reference to FIG. 12. The portions likethose of FIG. 11 are designated with the like reference numbers. In thisembodiment, an example of schematic operations of the data recordingapparatus which may selectively use the rerecordable optical disc andnon-rerecordable optical disc as in the case of the fourth embodimentexplained above is explained. However, in this embodiment, the datarecording is possible in the format (2) for the rerecordable opticaldisc.

When the power is turned ON (step S1101), the data format recorded inthe optical disc is judged in the step S1201. When the recording data isjudged as recorded in the format (1), the repair process (1) isconducted in the step S1103. Moreover, when the recording data is judgedas recorded in the format (2), the repair process (2) is conducted. Whenthe repair process (1) or (2) is completed, the apparatus enters thecondition waiting for the recording and reproducing operation in thestep S1104 and the repair process is completed in the step S1105. Therecording data judging operation can be realized depending on whetherthe recording data is filed or not or by acquiring a file name and thereis no limitation on the recording data judging method.

As explained above, according to the fifth embodiment of the presentinvention, the repair process can be executed corresponding to therespective recording data format independent of the optical disc byjudging the recording data format after the power is turned ON and bysharing the repair process. As a result, subsequent operations such aswatching of video data and additional record of data can be realizedcontinuously.

In above embodiments, a portable camera type data recording apparatushas been used as an example, but contents of the present invention isnot limited thereto and the present invention can also be adapted to astationary type data recording apparatus in which the power sourcevoltage is supplied through the indoor power supply wiring. However, inthis case, the guiding process to the AC power source explained in thethird embodiment is no longer required.

Moreover, in the embodiments explained above, an optical disc has beenused as the recording medium, but any type of medium such as a magneticdisc and a semiconductor memory or the like can be used when data can berecorded therein in the predetermined format on the real-time basis.

In addition, a detail analysis method of the stream data has not yetbeen explained in above embodiments but considerable degree of freedomare given to the analysis level, for example, that the analysis isexecuted in unit of the encoding unit such as video-pack or audio-packor the analysis is executed in more detail for all Huffman codes afterthe pictures of the video data.

Furthermore, in above embodiments, the AV data is recorded to the datarecording apparatus, but the technique of the present invention may alsobe used for a user data such as a program data or the like other thanthe AV data.

As explained above, according to the present invention, even if anaccidental shut-off condition occurs in the supply of power sourcevoltage during the recording of data into an optical disc based on thedata recording technique for recording, to an optical disc, a user dataand a management data used for management of user data, operations suchas watching of the recording data, additional record of data or thecompletion process can be conducted continuously. In addition, since anon-volatile memory is unnecessary, cost of apparatus can be lowered andformat control can also be simplified.

1. A data recording method for recording stream data and management dataused for management of said stream data into a recording medium whichdoes not allow a rerecording operation, said recording medium having atleast a first predefined area, a second predefined area, and a thirdpredefined area arranged beginning from an inner circumference thereof,the method comprising: a first step of recording first stream data ontosaid third predefined area, and recording first intermediate managementdata for management of said first stream data onto said secondpredefined area, wherein said first intermediate management data managessaid first data stream prior to a finalization operation; subsequent tosaid first step, a second step of recording second stream data onto saidthird predefined area, and recording second intermediate management datafor management of said first stream data and said second stream dataonto said second predefined area, wherein said second intermediatemanagement data manages said first stream data and said second streamdata prior to said finalization operation; and a third step of readingsaid first intermediate management data when a fault occurs in saidsecond intermediate management data.
 2. The data recording methodaccording to claim 1, further comprising a fourth step of analyzing datathat is managed by said first intermediate management data and which isrecorded on said recording medium to determine a data size thereof,generating third intermediate management data based on a result ofanalysis of said data, and recording said third management intermediatedata onto said recording medium.
 3. The data recording method accordingto claim 1, wherein said fault constitutes a mismatch between a datasize indication contained in said second intermediate management data ofdata that is managed by said second intermediate management data and thesize of said data as it is actually recorded on said recording medium.4. The data recording method according to claim 3, further comprising afourth step of analyzing stream data that is managed by said firstintermediate management data and which is recorded on said recordingmedium to determine a data size thereof, generating third intermediatemanagement data based on a result of analysis of said stream data andrecording said third intermediate management data onto said recordingmedium.
 5. The data recording method according to claim 4, wherein saidstream data is image data from a video camera.
 6. The data recordingmethod according to claim 4, wherein when it is determined in said thirdstep that a part of said recording medium on which said second streamdata is recorded defective, then said third intermediate management dataincludes information indicating that said defective part is not to bereproduced in a reproduction operation.
 7. A data recording method forrecording stream data and management data used for management of saidstream data into a recording medium which does not allow rerecordingoperations, said recording medium having at least a first predefinedarea, a second predefined area, and a third predefined area arrangedbeginning from an inner circumference thereof, the method comprising: afirst step of recording first stream data onto said third predefinedarea, and recording first intermediate management data for management ofsaid first stream data onto said second predefined area, wherein saidfirst intermediate management data manages said first stream data priorto a finalization operation; subsequent to said first step, a secondstep of recording second stream data onto said third predefined area,and recording second intermediate management data for management of saidfirst stream data and said second stream data onto said secondpredefined area, wherein said second intermediate management datamanages said first stream data and said second stream data prior to saidfinalization operation; and a third step of reading said firstintermediate management data when said second intermediate managementdata as recorded in said recording medium in said second step is notread.
 8. The data recording method according to claim 7, furthercomprising a fourth step of analyzing data that is managed by said firstintermediate management data and which is recorded on said recordingmedium to determine a data size thereof, generating third intermediatemanagement data based on a result of analysis of said data, andrecording said third management intermediate data onto said recordingmedium.
 9. The data recording method according to claim 8, wherein saidstream data is image data from a video camera.
 10. The data recordingmethod according to claim 9, wherein when it is determined in said thirdstep that a part of said recording medium on which said second streamdata is recorded defective, then said third intermediate management dataincludes information indicating that said defective part is not to bereproduced in a reproduction operation.
 11. A data recording apparatusfor recording stream data and management data used for management ofsaid stream data onto a recording medium which does not allow arerecording operation, said recording medium having at least a firstpredefined area, a second predefined area, and a third predefined areaarranged beginning from an inner circumference thereof, the datarecording apparatus comprising: a management data generator configuredto generate first intermediate management data and second intermediatemanagement data based on said stream data, wherein said firstintermediate management data manages first stream data prior tofinalization and said second intermediate management data manages secondstream data prior to finalization; a data recorder configured to recordat least one of said first stream data or said second stream data ontosaid third predefined area, said data recorder further configured torecord at least one of said first intermediate management data or saidsecond intermediate management data onto said second predefined area;and a data reproducer configured to read said first intermediatemanagement data when a fault is in said second intermediate managementdata recorded onto said recording medium.
 12. The data recordingapparatus according to claim 11, further comprising a stream dataanalyzer configured to analyze stream data managed by said firstintermediate management data to determine a data size of said streamdata, wherein said management data generator generates thirdintermediate management data based on a result of analysis of saidstream data, said third intermediate management data being recorded ontosaid recording medium by said data recorder.
 13. The data recordingapparatus according to claim 11, wherein said fault comprises a mismatchbetween a data size indication contained in said second intermediatemanagement data of data that is managed by said second intermediatemanagement data and the size of said data as it is actually recorded onsaid recording medium.
 14. The data recording apparatus according toclaim 13, further comprising a stream data analyzer configured toanalyze stream data analyzing stream data that is managed by said firstintermediate management data and which is recorded on said recordingmedium to determine a data size thereof, wherein said management datagenerator generates third intermediate management data based on a resultof analysis of said stream data, said third intermediate management databeing recorded onto said recording medium by said data recorder.
 15. Thedata recording apparatus according to claim 14, wherein said stream datais image data taken by a video camera.
 16. The data recording apparatusaccording to claim 15, wherein when it is determined in said third stepthat a part of said recording medium on which said second stream data isrecorded defective, then said third intermediate management dataproduced by said management data generator includes informationindicating that said defective part is not to be reproduced in areproduction operation.
 17. A data recording apparatus for recordingstream data and management data used for management of said stream dataonto a recording medium which does not allow rerecording operation, saidrecording medium having a first predefined area, a second predefinedarea, and a third predefined area sequentially arranged beginning froman inner circumference thereof, the data recording apparatus comprising:a management data generator configured to generate first intermediatemanagement data and second intermediate management data based on saidstream data, wherein said first intermediate management data managesfirst stream data prior to finalization and said second intermediatemanagement data manages said first stream data and second stream dataprior to finalization; a data recorder configured to record at least oneof said first stream data or said second stream data onto said thirdpredefined area, said data recorder further configured to record saidfirst intermediate management data onto said second predefined area andsaid first stream data and said second intermediate management data ontosaid second predefined area; and a data reproducer configured to readsaid first intermediate management data when said second intermediatemanagement data recorded onto said recording medium is not read.
 18. Thedata recording apparatus according to claim 17, further comprising astream data analyzer configured to analyze stream data managed by saidfirst intermediate management data to determine a data size of saidstream data, wherein said management data generator generates thirdintermediate management data based on a result of analysis of saidstream data, said third intermediate management data being recorded ontosaid recording medium by said data recorder.
 19. The data recordingapparatus according to claim 18, wherein said stream data is image datataken by video camera.
 20. The data recording apparatus according toclaim 19, wherein when it is determined in said third step that a partof said recording medium on which said second stream data is recordeddefective, then said third intermediate management data produced by saidmanagement data generator includes information indicating that saiddefective part is not to be reproduced in a reproduction operation.